using IQIGame.Onigao.Framework;
using IQIGame.Onigao.Game;

namespace IQIGame.Onigao.GamePlay
{
    public class UIN_CommonIconDesc : UIBaseNode
    {

        #region Template Generate,don't modify
        protected partial class UIB_UIN_CommonIconDesc
        {
            #region ObjectBinding Generate 
            public IQIGame.Onigao.Framework.ExImage icon { protected set; get; }
            public IQIGame.Onigao.Framework.ExText textDes { protected set; get; }
            public virtual void InitBinding(ObjectBinding __binding)
            {
                __binding.TryGetVariableValue<IQIGame.Onigao.Framework.ExImage>("icon", out var __tbv0);
                this.icon = __tbv0;
                __binding.TryGetVariableValue<IQIGame.Onigao.Framework.ExText>("textDes", out var __tbv1);
                this.textDes = __tbv1;
            }

            #endregion ObjectBinding Generate 
        }
        #endregion Template Generate,don't modify

        #region fields & properties
        protected UIB_UIN_CommonIconDesc ui { get; set; }
        #endregion

        protected override void BeforeInit()
        {
            ui = new UIB_UIN_CommonIconDesc();
            ui.InitBinding(this.csObjBind);
        }

        protected override void OnInit()
        {

        }

        protected override void OnShow()
        {

        }

        protected override void OnHide()
        {

        }

        protected override void OnDispose()
        {

        }

        public void Show(int state, string desc)
        {
            this.Show();
            //this.ui.icon.indexSwitchSprite = state;
            this.ui.textDes.text = desc;
            //this.ui.textDes.indexSwitchColor = state;
        }
    }
}
